<!-- index.html -->
{% extends "base.html" %}
{% load markdown_deux_tags %}
{% block title %} 欢迎光临我的博客 {% endblock %}
{% block headmessage %} 
    <h3 style="font-family: 楷体;">本站文章列表</h3>
{% endblock %}
{% block content %}
    {% for post in posts %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <p style='font-family: 微软雅黑;font-size: 14pt;font-weight: bold;'>
                    <a href='/post/{{post.slug}}'>{{post.title }}</a>
                </p>
            </div>
        </div>
        <div class="panel-body" style="background-color: #e4f1ab;">
            <p>
                {{post.summary|markdown}}...
            </p>
        </div>
        <div class="panel-footer" style="background-color: #d2cef9;">
            <p>
                发布时间：{{post.pub_date|date:"Y M d, h:m:s"}}
            </p>
        </div>
        <br>
    {% endfor %}

    <div id="counter-container" class="counter"></div>
    <script defer>
    document.addEventListener('DOMContentLoaded', function() {
        var c = document.getElementById('counter-container');
        if (c) {
            c.innerHTML = '<a href="https://info.flagcounter.com/fxR0">'
                + '<img src="https://s01.flagcounter.com/count2/fxR0/bg_FFFFFF/txt_000000/border_CCCCCC/columns_2/maxflags_12/viewers_0/labels_0/pageviews_0/flags_0/percent_0/" alt="Flag Counter" border="0" loading="lazy">'
                + '</a>';
        }
    });
    </script>
{% endblock %}
